#include "cmath"
#include "string" 
#include "time.h"
#include "vector"
using  namespace std ; 

#define LOAD_USER_FUN() do \
{ \
    chai.eval("var PI = 3.141592653589793238462643383279") ; \
    chai.add(chaiscript::fun(&tik), "tik");\
    chai.add(chaiscript::fun(&msin), "sin");\
    chai.add(chaiscript::fun(&mcos), "cos");\
    chai.add(chaiscript::fun(&mexp), "exp");\
    chai.add(chaiscript::fun(&mpow), "pow");\
    chai.add(chaiscript::fun(&msqrt), "sqrt");\
    chai.add(chaiscript::fun(&mlog), "log");\
    chai.add(chaiscript::fun(&mlog10), "log10");\
    chai.add(chaiscript::fun(&mabs), "abs");\
    chai.add(chaiscript::fun(&mceil), "ceil");\
    chai.add(chaiscript::fun(&mfloor), "floor");\
    chai.add(chaiscript::fun(&mround), "round");\
    chai.add(chaiscript::fun(&mmin), "min");\
    chai.add(chaiscript::fun(&mmax), "max");\
    chai.add(chaiscript::fun(&masin), "sain");\
    chai.add(chaiscript::fun(&macos), "acos");\
    chai.add(chaiscript::fun(&matan), "atan");\
    chai.add(chaiscript::fun(&matan2), "atan2");\
    chai.add(chaiscript::fun(&mtan), "tan");\
    chai.add(chaiscript::fun(&os), "os");\
} while(0)

double tik() ; 
double msin(double x) ; 
double mcos(double x) ; 
double mexp(double x);
double mpow(double x,double y);
double msqrt(double x);
double mlog(double x);
double mlog10(double x);
double mabs(double x) ;
int mceil(double x);
int mfloor(double x) ;
int mround(double x);
double mmin(double a , double b);
double mmax(double a , double b);
double masin(double x);
double macos(double x);
double matan(double x);
double matan2(double x,double y);
double mtan(double x);
void os(string x) ; // 执行OS的内部命令